# $Id: PKGBUILD 90125 2013-05-06 21:32:15Z faidoc $
# Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com>
# Contributor: Adam Hani Schakaki <adam@schakaki.net>
# Contributor: Ner0

pkgname=muffin
pkgver=1.8.0
pkgrel=1
pkgdesc="Cinnamon window manager based on Mutter"
arch=('i686' 'x86_64')
url="https://github.com/linuxmint/muffin"
license=('GPL')
depends=('clutter' 'gobject-introspection' 'gsettings-desktop-schemas' \
		 'libcanberra' 'startup-notification' 'zenity' 'dconf')
makedepends=('intltool' 'gnome-doc-utils' 'gnome-common')
options=('!libtool' '!emptydirs')
install=$pkgname.install
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/muffin/archive/$pkgver.tar.gz"
        "switch-applications.patch"
        "fix-dnd.patch")
sha256sums=('4b3f872c0a0325d88d2d6ece4b67202b7b91b89634fb3c8ff93ebd5c6acfbd67'
            '206eefac342b08e061c4eedfb6b9e0c96e2eae8fb9535f52f20bf50464381a96'
            '745dd3ef7eb8a496c68f5a728253205a849ac63851c0c0930c42442aec5af939')

build() {
  cd ${pkgname}-${pkgver}

  # Fix windows switcher keybinding with default settings in GNOME 3.8
  patch -Np1 -i ../switch-applications.patch

  # Fix unresponsive panel on DND
  patch -RNp1 -i ../fix-dnd.patch

  PYTHON=python2 ./autogen.sh --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/muffin \
  				 			 --localstatedir=/var --disable-static --disable-schemas-compile
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="$pkgdir/" install
}

# vim:set ts=2 sw=2 et:
